package com.warm.orm.domain.job;

import com.easy.query.core.annotation.Column;
import com.easy.query.core.annotation.EntityProxy;
import com.easy.query.core.annotation.Table;
import com.easy.query.core.proxy.ProxyEntityAvailable;
import com.warm.core.annotation.Excel;
import com.warm.orm.domain.BaseEntity;
import com.warm.orm.domain.job.proxy.SysJobLogProxy;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 定时任务调度日志表 sys_job_log
 *
 * @author hh
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table("sys_job_log")
@EntityProxy
public class SysJobLog extends BaseEntity implements ProxyEntityAvailable<SysJobLog, SysJobLogProxy> {

    /**
     * ID
     */
    @Excel(name = "日志序号")
    @Column(primaryKey = true, increment = true)
    private Long jobLogId;

    private String tenantId;

    /**
     * 任务名称
     */
    @Excel(name = "任务名称")
    private String jobName;

    /**
     * 任务组名
     */
    @Excel(name = "任务组名")
    private String jobGroup;

    /**
     * 调用目标字符串
     */
    @Excel(name = "调用目标字符串")
    private String invokeTarget;

    /**
     * 日志信息
     */
    @Excel(name = "日志信息")
    private String jobMessage;

    /**
     * 执行状态（0正常 1失败）
     */
    @Excel(name = "执行状态", readConverterExp = "0=正常,1=失败")
    private String status;

    /**
     * 异常信息
     */
    @Excel(name = "异常信息")
    private String exceptionInfo;

    /**
     * 开始时间
     */
    private Date startTime;

    /**
     * 停止时间
     */
    private Date stopTime;

    @Override
    public Class<SysJobLogProxy> proxyTableClass() {
        return SysJobLogProxy.class;
    }
}
